import ImageList from "../../../controls/lists/image";
import List from "../../../controls/lists";
import TabService from "./../../tabservice";

class IndexService extends TabService {
    defaultData() {
        let info = {
            link: "",
            tabs: [
                {
                    name: "林业要闻",
                    active: true,
                    type: List,
                    option: {
                        url: "/api/cms/cmsArticleCache/queryPage",
                        type: ImageList,
                        parameter: {
                            siteId: "cyjlgb",
                            columnId: "COLUMN_PHONE_NEW"
                        }
                    }
                },
                {
                    name: "新闻播报",
                    active: false,
                    type: List,
                    option: {
                        url: "/api/cms/cmsArticleCache/queryPage",
                        type: ImageList,
                        parameter: {
                            siteId: "cyjlgb",
                            columnId: "COLUMN_NEW"
                        }
                    }
                },
                {
                    name: "工作动态",
                    active: false,
                    type: List,
                    option: {
                        url: "/api/cms/cmsArticleCache/queryPage",
                        type: ImageList,
                        parameter: {
                            siteId: "cyjlgb",
                            columnId: "COLUMN_WORK_MANAGER"
                        }
                    }
                }
            ]
        };
        this.setTabs(info.tabs);
        return info;
    }

    onupdate(current, data) {
        Object.assign(current, data);
    }
}

export default IndexService;